package br.perfiman.faces;

import br.perfiman.model.CreditCard;
import br.perfiman.service.AbstractService;
import br.perfiman.service.CreditCardService;
import br.perfiman.utils.ServiceLocator;

public class CreditCardBean extends AbstractBean<CreditCard>{

	public CreditCardBean() throws Exception {
		if(getEntity() == null)
			setEntity(new CreditCard());
		retrieveAll();
	}

	@Override
	protected AbstractService<CreditCard> getService() throws Exception {
		if(service == null){
			service = (CreditCardService) ServiceLocator.getInstance().get("CreditCardServiceBean/remote");
		}
		return service;
	}
}
